<%@tag import="by.epam.communalservices.dao.jdbc.JdbcDaoUser"%>
<%@tag import="by.epam.communalservices.entity.User"%>
<%@tag import="java.sql.Connection"%>
<%@ attribute name="id" required="true"%>


<%
    Connection con = (Connection) request.getSession().getAttribute("currentConnection");
    User user = null;
    JdbcDaoUser userDao = new JdbcDaoUser(con);
    if (getJspContext().getAttribute("id") != "" && Long.parseLong(getJspContext().getAttribute("id").toString()) > 0) {
        user = userDao.read(Long.parseLong(getJspContext().getAttribute("id").toString()));
    }
    if (user!=null) {
        out.println(user.getLogin());
    } else {
        out.println("-нет-");
    }
 %>